package com.management.platform.service.serviceImpl;

import com.management.platform.mapper.Sys_userMapper;
import com.management.platform.mapper.Sys_user_roleMapper;
import com.management.platform.model.Sys_user;
import com.management.platform.model.Sys_user_role;
import com.management.platform.service.UserLoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserLoginServiceImpl implements UserLoginService {

  @Autowired
  Sys_userMapper user;
  @Autowired
  Sys_user_roleMapper sys_user_roleMapper;

  @Override
  public Sys_user selectByLogin(String name, String pwd) {
    return user.selectByLogin(name,pwd);
  }

  @Override
  public Sys_user selectByUsername(String username) {
    return user.selectByUsername(username);
  }

  @Override
  public Sys_user selectByPassword(String password) {
    return user.selectByPassword(password);
  }

  @Override
  public Sys_user_role selectRoleId(Integer userId) {
    return sys_user_roleMapper.selectRoleId(userId);
  }

}
